<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>案件分类</title>
    <script type="text/javascript" charset="utf-8" src="${contextPath}/resources/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="${contextPath}/resources/ueditor/ueditor.all.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="${contextPath}/resources/ueditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body>
<div class="pageheader">
    <h2>案件分类</h2>
</div>
<div class="contentpanel">
    <div class="panel panel-default">
        <form:form commandName="formDto" cssClass="form-horizontal form-bordered">
            <form:hidden path="parent.uuid"/>
            <c:if test="${not empty formDto.parent.uuid}">
                <form:hidden path="parent.name"/>
                <div class="form-group">
                    <label class="col-sm-1 control-label">上级分类</label>

                    <div class="col-sm-10">
                        <form:input path="parent.name" cssClass="form-control" required="required" placeholder="名称"
                                    maxlength="200" disabled="true"/>
                        <form:errors path="parent.name" cssClass="error text-danger"/>
                    </div>
                </div>
            </c:if>
            <div class="form-group">
                <label class="col-sm-1 control-label">名称</label>

                <div class="col-sm-10">
                    <form:input path="name" cssClass="form-control" required="required" placeholder="名称"
                                maxlength="200"/>
                    <form:errors path="name" cssClass="error text-danger"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label">分类描述</label>

                <div class="col-sm-10">
                    <form:textarea path="content" rows="8"/>
                    <form:errors path="content" cssClass="error text-danger"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label"></label>

                <div class="col-sm-10">
                    <button type="submit" class="btn btn-primary">提交</button>
                    <a href="javascript:window.history.go(-1);" class="btn btn-default">取消</a>
                </div>
            </div>
        </form:form>
    </div>
</div>
<script type="text/javascript">
    var ue = UE.getEditor('content');
</script>
</body>
</html>
